home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_usrdoc / NCURSES-.{1J / INSTALL.{_4 < prev    next >
Text File  |  1999-09-17  |  19KB  |  425 lines

  1. ---------------------------------------------------------------------
  2.              How to install Ncurses/Terminfo on your system 
  3. ---------------------------------------------------------------------
  4.     ************************************************************
  5.     * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. *
  6.     ************************************************************
  7.  
  8. You should be reading the file INSTALL in a directory called
  9. ncurses-d.d.d, where d.d.d is the current version number.  There
  10. should be several subdirectories, including `c++', `form', `man', `menu',
  11. 'misc', `ncurses', `panel', `progs', and `test'.  See the README file
  12. for a roadmap to the package.
  13.  
  14. If you are a Linux or FreeBSD or NetBSD distribution integrator or packager,
  15. please read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR
  16. below.
  17.  
  18. If you are converting from BSD curses and do not have root access, be sure
  19. to read the BSD CONVERSION NOTES section below.
  20.  
  21. If you are using a version of XFree86 xterm older than 3.1.2F, see the section
  22. on RECENT XTERM VERSIONS below.
  23.  
  24. If you are trying to build GNU Emacs using ncurses for terminal support,
  25. read the USING NCURSES WITH EMACS section below.
  26.  
  27. If you are trying to build Elvis using ncurses for terminal support,
  28. read the USING NCURSES WITH ELVIS section below.
  29.  
  30. If you are running over the Andrew File System see the note below on
  31. USING NCURSES WITH AFS.
  32.  
  33. If you want to build the Ada95 binding, go to the Ada95 directory and
  34. follow the instructions there.  The Ada95 binding is not covered below.
  35.  
  36. If you are using anything but (a) Linux, or (b) one of the 4.4BSD-based
  37. i386 Unixes, go read the Portability section in the TO-DO file before you
  38. do anything else.
  39.  
  40. REQUIREMENTS:
  41.  
  42. You will need the following in order to build and install ncurses under UNIX:
  43.  
  44.     * ANSI C compiler  (gcc is recommended)
  45.     * sh               (bash will do)
  46.     * awk              (mawk or gawk will do)
  47.     * sed
  48.     * BSD or System V style install (a script is enclosed)
  49.  
  50. INSTALLATION PROCEDURE:
  51.  
  52. 1.  First, decide whether you want ncurses to replace your existing library (in
  53.     which case you'll need super-user privileges) or be installed in parallel 
  54.     with it.  
  55.  
  56.     The --prefix option to configure changes the root directory for installing
  57.     ncurses.  The default is in subdirectories of /usr/local. Use --prefix=/usr
  58.     to replace your default curses distribution. This will be the case for 
  59.     Linux and BSD/OS users.
  60.  
  61.     The package gets installed beneath the --prefix directory as
  62.     follows:
  63.  
  64.     In $(prefix)/bin:          tic, infocmp, captoinfo, tset, 
  65.                     reset, clear, tput, toe
  66.     In $(prefix)/lib:          libncurses*.* libcurses.a
  67.     In $(prefix)/share/terminfo: compiled terminal descriptions
  68.     In $(prefix)/include:      C header files
  69.     Under $(prefix)/man:       the manual pages
  70.  
  71. 2.  Type `./configure' in the top-level directory of the distribution to
  72.     configure ncurses for your operating system and create the Makefiles.
  73.     Besides --prefix, various configuration options are available to customize
  74.     the installation; use `./configure --help' to list the available options.
  75.  
  76.     If your operating system is not supported, read the PORTABILITY section in
  77.     the file ncurses/README for information on how to create a configuration
  78.     file for your system.
  79.  
  80.     The `configure' script generates makefile rules for one or more object
  81.     models and their associated libraries:
  82.  
  83.     libncurses.a (normal)
  84.  
  85.     libcurses.a (normal, a link to libncurses.a)
  86.         This gets left out if you configure with --disable-overwrite.
  87.  
  88.     libncurses.so (shared)
  89.  
  90.     libncurses_g.a (debug)
  91.  
  92.     libncurses_p.a (profile)
  93.  
  94.     If you do not specify any models, the normal and debug libraries will be
  95.     configured.  Typing `configure' with no arguments is equivalent to:
  96.  
  97.         ./configure --with-normal --with-debug --enable-overwrite
  98.  
  99.     Rules for generating shared libraries are highly dependent upon the choice
  100.     of host system and compiler.  We've been testing shared libraries on Linux
  101.     and SunOS with gcc, but more work needs to be done to make shared libraries
  102.     work on other systems.
  103.  
  104.     You can make curses and terminfo fall back to an existing file of termcap
  105.     definitions by configuring with --enable-termcap.  If you do this, the
  106.     library will search /etc/termcap before the terminfo database, and will
  107.     also interpret the contents of the TERM environment variable.  See the
  108.     section BSD CONVERSION NOTES below.
  109.  
  110. 3.  Type `make'.  Ignore any warnings, no error messages should be produced. 
  111.     This should compile the ncurses library, the terminfo compiler tic(1), 
  112.     captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1) 
  113.     programs (see the man pages for explanation of what they do), some test 
  114.     programs, and the panels, menus, and forms libraries.
  115.  
  116. 4.  Run ncurses and several other test programs in the test directory to
  117.     verify that ncurses functions correctly before doing an install that
  118.     may overwrite system files.  Read the file test/README for details on
  119.     the test programs.
  120.  
  121.     The ncurses program is designed specifically to test the ncurses library.
  122.     You can use it to verify that the screen highlights work correctly, that
  123.     cursor addressing and window scrolling works OK, etc.
  124.  
  125. 5.  Once you've tested, you can type `make install' to install libraries,
  126.     the programs, the terminfo database and the man pages.  Alternately, you
  127.     can type `make install' in each directory you want to install.  In the
  128.     top-level directory, you can do a partial install using these commands:
  129.  
  130.     'make install.progs'    installs tic, infocmp, etc...
  131.       'make install.includes' installs the headers.
  132.       'make install.libs'     installs the libraries.
  133.       'make install.data'     installs the terminfo data. (Note: `tic' must
  134.                             be installed before the terminfo data can be
  135.                     compiled).
  136.     'make install.man'      installs the man pages.
  137.  
  138.   ############################################################################
  139.   #     CAVEAT EMPTOR: `install.data' run as root will NUKE any existing     #
  140.   #  terminfo database. If you have any custom or unusual entries SAVE them  #
  141.   #  before you install ncurses.  I have a file called terminfo.custom for   #
  142.   #  this purpose.  Don't forget to run tic on the file once you're done.    #
  143.   ############################################################################
  144.  
  145.     The terminfo(5) manual page wants to be preprocessed with tbl(1) before
  146.     being formatted by nroff(1).  Modern man(1) implementations tend to do
  147.     this by default, but you may want to look at your version's man page
  148.     to be sure.
  149.  
  150.     If the system already has a curses library that you need to keep using
  151.     for some bizarre binary-compatibility reason, you'll need to distinguish
  152.     between it and ncurses. If ncurses is installed outside the standard
  153.     directories (/usr/include and /usr/lib) then all your users will need
  154.     to use the -I option to compile programs and -L to link them.
  155.  
  156.     If you have BSD curses installed in your system and you accidentally
  157.     compile using its curses.h you'll end up with a large number of
  158.     undefined symbols at link time. _waddbytes is one of them.
  159.  
  160.     IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory
  161.     and run the `capconvert' script.  This script will deduce various things
  162.     about your environment and use them to build you a private terminfo tree,
  163.     so you can use ncurses applications.
  164.  
  165.     If more than one user at your site does this, the space for the duplicate
  166.     trees is wasted.  Try to get your site administrators to install a system-
  167.     wide terminfo tree instead.
  168.  
  169.     See the BSD CONVERSION NOTES section below for a few more details.
  170.  
  171. 6.  The c++ directory has C++ classes that are built on top of ncurses and
  172.     panels.  You need to have c++ (and its libraries) installed before you can
  173.     compile and run the demo.
  174.  
  175. 7.  If you're running an older Linux, you must either (a) tell Linux that the
  176.     console terminal type is `linux' or (b) make a link to or copy of the
  177.     linux entry in the appropriate place under your terminfo directory, named
  178.     `console'.  All 1.3 and many 1.2 distributions (including Yggdrasil and
  179.     Red Hat) already have the console type set to `linux'.
  180.  
  181.     The way to change the wired-in console type depends on the configuration
  182.     of your system. This may involve editing /etc/inittab, /etc/ttytype,
  183.     /etc/profile and other such files.
  184.  
  185.     Warning: this is not for the fainthearted, if you mess up your console
  186.     getty entries you can make your system unusable!  However, if you are
  187.     a distribution maker, this is the right thing to do (see the note for
  188.     integrators near the end of this file).
  189.  
  190.     The easier way is to link or copy l/linux to c/console under your terminfo
  191.     directory.  Note: this will go away next time you do `make install.data'
  192.     and you'll have to redo it. There is no need to have entries for all 
  193.     possible screen sizes, ncurses will figure out the size automatically.
  194.  
  195. IF YOU ARE A SYSTEM INTEGRATOR:
  196.  
  197.     Beginning with 1.9.9, the ncurses distribution includes both a tset
  198.     utility and /usr/share/tabset directory.  If you are installing ncurses,
  199.     it is no longer either necessary or desirable to install tset-jv.
  200.  
  201.     Configuration and Installation:
  202.  
  203.     Configure with --prefix=/usr to make the install productions put
  204.     libraries and headers in the correct locations (overwriting any
  205.     previous curses libraries and headers).  This will put the terminfo
  206.     hierarchy under /usr/share/terminfo; you may want to override this with
  207.     --datadir=/usr/share/misc/terminfo
  208.  
  209.     Please configure the ncurses library in a pure-terminfo mode; that
  210.     is, with the --disable-termcap option.   This will make the ncurses 
  211.     library smaller and faster. The ncurses library includes a termcap 
  212.     emulation that queries the terminfo database, so even applications 
  213.     that use raw termcap to query terminal characteristics will win 
  214.     (providing you recompile and relink them!).
  215.  
  216.     If you must configure with termcap fallback enabled, you may also
  217.     wish to use the --enable-getcap option.  This option speeds up
  218.     termcap-based startups, at the expense of not allowing personal
  219.     termcap entries to reference the terminfo tree.  See the code in 
  220.     ncurses/read_termcap.c for details.
  221.  
  222.     Keyboard Mapping:
  223.  
  224.     The terminfo master file assumes that Shift-Tab generates \E[Z
  225.         (the ECMA-48 reverse-tabulation sequence) rather than ^I.  Here are
  226.     the loadkeys -d    mappings that will set this up:
  227.  
  228.         keycode  15 = Tab             Tab             
  229.             alt     keycode  15 = Meta_Tab        
  230.             shift    keycode  15 = F26
  231.         string F26 ="\033[Z"
  232.  
  233.     Naming the Console Terminal
  234.  
  235.     In various Linuxes (and possibly elsewhere) there has been a practice
  236.     of designating the system console driver type as `console'.  Please
  237.     do not do this any more!  It complicates peoples' lives, because it
  238.     can mean that several different terminfo entries from different 
  239.     operating systems all logically want to be called `console'.
  240.  
  241.     Please pick a name unique to your console driver and set that up
  242.     in the /etc/inittab table or local equivalent.  Send the entry to the
  243.     terminfo maintainer (listed in the misc/terminfo file) to be included
  244.     in the terminfo master, if it's not already there.  See the
  245.     term(7) manual page included with this distribution for more on
  246.     conventions for choosing type names.
  247.  
  248.     Here are our recommended primary console names for the most important
  249.     freeware UNIX distributions:
  250.  
  251.         linux    -- Linux console driver
  252.         freebsd    -- FreeBSD
  253.         netbsd    -- NetBSD
  254.         bsdos    -- BSD/OS
  255.  
  256.     If you are responsible for integrating ncurses for one of these
  257.     distribution, please either use the recommended name or get back
  258.     to us explaining why you don't want to, so we can work out nomenclature
  259.     that will make users' lives easier rather than harder.
  260.  
  261. RECENT XTERM VERSIONS
  262.     The terminfo database file included with this distribution assumes
  263.     you are running an Xfree86 xterm version 3.1.2E or more recent.
  264.  
  265.     If you are running XFree version 3.1.2D or earlier, or a stock X11R6
  266.     xterm, you will need to modify the termtypes.src file to make xterm
  267.     an alias of xterm-x11r6 (rather than xterm-color), and then re-install.
  268.     Otherwise, your    xterm screen displays may be incorrect (because
  269.     ncurses will be assuming the presence of hpa/vpa capabilities that
  270.     don't actually work correctly.)
  271.  
  272. CONFIGURING FALLBACK ENTRIES
  273.     In order to support operation of ncurses programs before the terminfo
  274.     tree is accessible (that is, in single-user mode or at OS installation
  275.     time) the ncurses library can be compiled to include an array of 
  276.     pre-fetched fallback entries.
  277.  
  278.     These entries are checked by setupterm() only when the conventional
  279.     fetches from the terminfo tree and the termcap fallback (if configured)
  280.     have been tried and failed.  Thus, the presence of a fallback will not
  281.     shadow modifications to the on-disk entry for the same type, when that
  282.     entry is accessible.
  283.  
  284.     By default, there are no entries on the fallback list.  After you
  285.     have built the ncurses suite for the first time, you can change
  286.     the list (the process needs infocmp(1)).  To do so, use the
  287.     script MKfallback.sh.
  288.  
  289.     If you wanted (say) to have linux, vt100, and xterm fallbacks, you
  290.     would use the commands
  291.  
  292.         cd ncurses;
  293.         MKfallback.sh linux vt100 xterm >fallback.c
  294.  
  295.     Then just rebuild and reinstall the library as you would normally.
  296.     You can restore the default empty fallback list with
  297.  
  298.         MKfallback.sh >fallback.c
  299.  
  300.     The overhead for an empty fallback list is one trivial stub function.
  301.     Any non-empty fallback list is const-ed and therefore lives in sharable
  302.     text space.  You can look at the comment trailing each initializer in
  303.     the generated ncurses/fallback.c file to see the core cost of the
  304.     fallbacks.  A good rule of thumb for modern vt100-like entries is that
  305.     each one will cost about 2.5K of text space.
  306.  
  307. BSD CONVERSION NOTES:
  308.     If you need to support really ancient BSD programs, you probably
  309.     want to configure with the --enable-bsdpad option.  What this does
  310.     is enable code in tputs() that recognizes a numeric prefix on a
  311.     capability as a request for that much trailing padding in milliseconds.
  312.     There are old BSD programs that do things like tputs("50").
  313.  
  314.     (If you are distributing ncurses as a support-library component of
  315.     an application you probably want to put the remainder of this section
  316.     in the package README file.)
  317.  
  318.         The following note applies only if you have configured ncurses with
  319.     --enable-termcap.
  320.  
  321. ------------------------------- CUT HERE --------------------------------
  322.  
  323. If you are installing this application privately (either because you
  324. have no root access or want to experiment with it before doing a root
  325. installation), there are a couple of details you need to be aware of.
  326. They have to do with the ncurses library, which uses terminfo rather
  327. than termcap for describing terminal characteristics.
  328.  
  329. Though the ncurses library is terminfo-based, it will interpret your
  330. TERMCAP variable (if present), any local termcap files you reference
  331. through it, and the system termcap file.  However, in order to avoid
  332. slowing down your application startup, it will only do this once per
  333. terminal type!
  334.  
  335. The first time you load a given terminal type from your termcap
  336. database, the library initialization code will automatically write it
  337. in terminfo format to a subdirectory under $HOME/.terminfo.  After
  338. that, the initialization code will find it there and do a (much
  339. faster) terminfo fetch.
  340.  
  341. Usually, all this means is that your home directory will silently grow
  342. an invisible .terminfo subdirectory which will get filled in with
  343. terminfo descriptions of terminal types as you invoke them.  If anyone
  344. ever installs a global terminfo tree on your system, this will quietly
  345. stop happening and your $HOME/.terminfo will become redundant.
  346.  
  347. The objective of all this logic is to make converting from BSD termcap
  348. as painless as possible without slowing down your application (termcap
  349. compilation is expensive).
  350.  
  351. If you don't have a TERMCAP variable or custom personal termcap file,
  352. you can skip the rest of this dissertation.
  353.  
  354. If you *do* have a TERMCAP variable and/or a custom personal termcap file
  355. that defines a terminal type, that definition will stop being visible
  356. to this application after the first time you run it, because it will
  357. instead see the terminfo entry that it wrote to $HOME/terminfo the
  358. first time around.
  359.  
  360. Subsequently, editing the TERMCAP variable or personal TERMCAP file
  361. will have no effect unless you explicitly remove the terminfo entry
  362. under $HOME/terminfo.  If you do that, the entry will be recompiled 
  363. from your termcap resources the next time it is invoked.
  364.  
  365. To avoid these complications, use infocmp(1) and tic(1) to edit the
  366. terminfo directory directly. 
  367.  
  368. ------------------------------- CUT HERE --------------------------------
  369.  
  370. USING NCURSES WITH AFS:
  371.     AFS treats each directory as a separate logical filesystem, you
  372.     can't hard-link across them.  The --enable-symlinks option copes
  373.     with this by making tic use symbolic links.
  374.  
  375. USING NCURSES WITH EMACS:
  376.     GNU Emacs has its own termcap support.  By default, it uses a mixture
  377.     of those functions and code linked from the host system's libraries.  
  378.     You need to foil this and shut out the GNU termcap library entirely.
  379.  
  380.     In order to do this, hack the Linux config file (s/linux.h) to contain
  381.     a #define TERMINFO and set the symbol LIBS_TERMCAP to "-lncurses".
  382.  
  383.     We have submitted such a change for the 19.30 release, so it may
  384.     already be applied in your sources -- check for the #define TERMINFO.
  385.  
  386. USING NCURSES WITH ELVIS:
  387.     To use ncurses as the screen-painting library for Elvis, apply the
  388.     following patch to the Elvis curses
  389.  
  390. *** curses.c.orig       Sun Jun 26 05:48:23 1994
  391. --- curses.c    Sun Feb 11 16:50:41 1996
  392. ***************
  393. *** 986,992 ****
  394.   {
  395.         if (has_IM)
  396.                 do_IM();
  397. !       do_IC();
  398.         qaddch(ch);
  399.         if (has_EI)
  400.                 do_EI();
  401. --- 986,995 ----
  402.   {
  403.         if (has_IM)
  404.                 do_IM();
  405. !#ifdef NCURSES_VERSION
  406. !       else    /* ncurses does insertion in a slightly nonstandard way */
  407. !#endif
  408. !               do_IC();
  409.         qaddch(ch);
  410.         if (has_EI)
  411.                 do_EI();
  412.  
  413. This patch is for elvis-1.8pl4 but it can even be used for elvis-1.8pl3 with
  414. an offset of -11 lines.
  415.  
  416. BUGS:
  417.     Send any feedback to the ncurses mailing list at
  418.     ncurses-list@netcom.com. To subscribe send mail to
  419.     listserv@netcom.com with body that reads:
  420.     subscribe ncurses-list <your-email-address-here>
  421.  
  422.     The Hacker's Guide in the misc directory includes some guidelines
  423.     on how to report bugs in ways that will get them fixed most quickly.
  424.  
  425.